package com.briup.day21;

import java.util.Arrays;

//测试链表实现集合
public class MyCollectionTest2 {
	
	public static void main(String[] args) {
		
		MyCollectionImpl2 coll = new MyCollectionImpl2();
		
		coll.add(null);
		coll.add("hello");
		coll.add("hi");
		coll.add("hw");     
		coll.add("helloworld");
		coll.print();
		System.out.println(coll.contains("hi"));
		coll.remove(null);
		coll.print();
		System.out.println(coll.size());
		
		Object[] arr = coll.toArray();
		
		System.out.println(Arrays.toString(arr));
		
		
		Looper looper = coll.looper();
		while (looper.hasNext()) {
			System.out.println(looper.next());
			
		}
	}
	
}
